package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.domain.Role;
import cn.wolfcode.crm.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);


    Employee selectByNameAndPassword(@Param("username") String username, @Param("password") String password);


    List<Employee> selectForList(QueryObject qo);

    void insertToEmp_Role(@Param("eid") Long eid, @Param("rid") Long rid);


    void deleteByEmployeeId(Long id);

    List<String> selectByEmployeeId(Long id);

    void deleteByIds(Long[] ids);

    void deleteMidTableByIds(Long[] ids);

    Employee selectByName(String name);

    //角色查员工
    List<Employee> selectByRole(String... sns);
}